#include <iostream>
#include<map>
#include<string>

using namespace std;

int main()
{
    string s;
    char ch;
    scanf("%c", &ch);
    while (ch != '\n')
    {
        s += ch;
        scanf("%c", &ch);
    }
    map<string, int> m;
    string::iterator left = s.begin(), right = s.begin();
    while (left != s.end() && right != s.end())
    {
        while (right != s.end() && *right != ' ' && *right != '.')
        {
            right++;
        }
        string::iterator l = left, r = right;
        string tmp;
        while (l != r)
        {
            if (*l >= 'A' && *l <= 'Z')
            {
                tmp += *l + 32;
            }
            else
            {
                tmp += *l;
            }
            l++;
        }
        m[tmp]++;
        if (right != s.end())
        {
            left = right + 1;
            right++;
        }
    }
    for (auto mm : m)
    {
        cout << mm.first << ':' << mm.second << endl;
    }
}